Added some more output to cleanupUploadStash.php
authorReedy <reedy@wikimedia.org>
Wed, 9 May 2012 02:38:21 +0000 (03:38 +0100)
committerReedy <reedy@wikimedia.org>
Wed, 9 May 2012 02:38:21 +0000 (03:38 +0100)
Change-Id: I8acf22df78a97c6e4003e7e5ed89800f1be41c6a

maintenance/cleanupUploadStash.php

index 5f57ffd..c8d8924 100644 (file)
@@ -68,15 +68,21 @@ class UploadStashCleanup extends Maintenance {
                // out-of-date someday
                $stash = new UploadStash( $repo );
 
+               $i = 0;
                foreach( $keys as $key ) {
+                       $i++;
                        try {
                                $stash->getFile( $key, true );
                                $stash->removeFileNoAuth( $key );
                        } catch ( UploadStashBadPathException $ex ) {
                                $this->output( "Failed removing stashed upload with key: $key\n"  );
                        }
+                       if ( $i % 100 == 0 ) {
+                               $this->output( "$i\n" );
+                       }
                }
-       }
+               $this->output( "$i done\n" );
+       }
 }
 
 $maintClass = "UploadStashCleanup";